package com.hengxinguotong.hxgtwygsp.ui.notice;

import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;

import com.hengxinguotong.hxgtwygsp.R;
import com.hengxinguotong.hxgtwygsp.ui.base.BaseTabFragment;
import com.hengxinguotong.hxgtwygsp.ui.base.DialogActivity;

import javax.inject.Inject;

/**
 * TODO 通知公告
 *
 * @author hjz
 * @since 2019/4/2 10:36
 * @version V1.0.0
 */
public class NoticeActivity extends DialogActivity implements NoticeContract.IView
{
    @Inject
    NoticeContract.IPresenter mPresenter;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);
        mPresenter.bindView(this);
    }

    @Override
    protected void onDestroy()
    {
        super.onDestroy();
        mPresenter.dropView();
    }

    @Override
    public void initFragmentList()
    {
        dialogTitle.setText(R.string.notice_text);
        BaseTabFragment tabFragment;
        for (int i = 0; i < 5; i++)
        {
            tabFragment = new NoticeFragment();
            tabFragment.setTabText("i = " + i);
            baseTabFragmentList.add(tabFragment);
        }
    }
}
